﻿using Bids.Core.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using Telerik.OpenAccess.Metadata;
using Telerik.OpenAccess.Metadata.Fluent;
namespace Bids.Core.DomainObjects
{
	/// <summary>
	/// 投稿列表
	/// </summary>
	[Serializable]
    public class SinglePage : IEntity
	{
        
		/// <summary>
		/// 
		/// </summary>
        public virtual int ID { set; get; }
		/// <summary>
		/// 名称
		/// </summary>
        public virtual string Title { set; get; }
        /// <summary>
        /// 描述
        /// </summary>
        public virtual string Content { get; set; }


        public static MappingConfiguration<SinglePage> CreateConfiguration()
        {
            var threadMapping = new MappingConfiguration<SinglePage>();
            threadMapping.MapType(t => new
            {
                t.ID,
                t.Title,
                t.Content
            }).ToTable("SinglePages");
            threadMapping.HasProperty(t => t.ID).IsIdentity(KeyGenerator.Autoinc);
           
            return threadMapping;
        }

	}
}

